
CREATE OR REPLACE PROCEDURE INSERTARPAGOSERVICIOUSR 
(
  CANTIDAD IN NUMBER  
, SERVID IN NUMBER  
, NOMBREUSR IN VARCHAR2
, FECHA IN VARCHAR2
) AS 

USRID NUMBER;

BEGIN

SELECT USR_ID INTO USRID FROM USUARIO WHERE USR_LOGIN = NOMBREUSR;

INSERT INTO PAGO (PAG_ID,PAG_MONTO,PAG_FECHA,FKSSYS_ID,FKSUSR_ID,FKUSR_ID) VALUES
      (pagsersys.NEXTVAL,CANTIDAD,TO_DATE(FECHA,'DD/MM/YYYY'),null,SERVID,USRID);

  NULL;
END INSERTARPAGOSERVICIOUSR;